<?php

namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use App\Http\Requests\UserContext;
use App\Http\Services\CourseService;
use App\Http\Services\TeacherService;
use App\Http\Traits\ResponseJson;

class TeacherController extends Controller
{
    use ResponseJson;

    protected $teacherService;

    public function __construct(TeacherService $teacherService)
    {
        $this->teacherService = $teacherService;
    }

    public function lists(UserContext $userContext)
    {
        $data = $this->teacherService->lists($userContext);
        return $this->returnJson($data);
    }

    public function detail(UserContext $userContext)
    {
        $data = $this->teacherService->detail($userContext);
        return $this->returnJson($data);
    }

    public function statics(UserContext $userContext)
    {
        $data = $this->teacherService->statics($userContext);
        return $this->returnJson($data);
    }

    public function gateStatics(UserContext $userContext)
    {
        $data = $this->teacherService->gateStatics($userContext);
        return $this->returnJson($data);
    }

    public function teacherDetail(UserContext $userContext)
    {
        $data = $this->teacherService->teacherDetail($userContext);
        return $this->returnJson($data);
    }

    public function save(UserContext $userContext)
    {
        $data = $this->teacherService->save($userContext);
        return $this->returnJson($data);
    }

}
